import React from 'react';
import { Button, Result } from 'antd';
import { useNavigate } from 'react-router-dom';

const ErrorPage: React.FC = () => {
  const router = useNavigate();
  return (
    <Result
      status="404"
      title="404"
      subTitle="很抱歉，您访问的页面不存在。"
      extra={
        <Button type="primary" onClick={() => router('/home')}>
          回到主页
        </Button>
      }
    />
  );
};

export default ErrorPage;
